﻿<%@ page language="java" contentType="text/html; charset=UTF-8"   pageEncoding="UTF-8"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>

<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<script language="javascript">
	function col_save() {
		var data = {folderName: $('.collect_add02 input').val()};
		$.post("/sumer/collect/addCollectFolder", data, function(result) {
			if(result.state == 1){
				alert('添加成功！');
				location.reload();
			} else if(result.state == -1){
				alert('添加失败，收藏夹已存在！');
			} else {
				alert('添加失败！');
			}
		}, 'json');
	}
</script>



<!-- 是当前所属人员 -->
<c:if test="${isMeData}"> 

	 <!--新建收藏夹-->
	<div id="collect_add" class="collect_add">
		<div class="collect_add01"> <!-- 新建 -->收藏夹
			<div style="position:relative;float:right;width:15px;height:15px;"> <a href="#" onMouseDown="col_del()"><img src="${imgpath}/images/cha.png"/></a> </div>
		</div>
		<div class="collect_add02"> 收藏夹名称：
			<input type="text" style="height:25px;">
			<br/>
			<span style="font-size:12px;color:#666;font-weight:100;">(请将分类名称限制在20字以内)</span> </div>
		<div class="collect_add02"> <a href="#" onclick="col_save();">
			<div style="height:24px;width:50px; background-color:#578429;color:#FFF;position:absolute;float:left;left:120px;"> 确&nbsp;认 </div>
			</a> <a href="#" onMouseDown="col_del()">
			<div style="height:24px;width:50px;color:#555;position:absolute;float:left;left:180px;"> 取&nbsp;消 </div>
			</a> </div>
	</div>
	<!--end新建收藏夹-->

</c:if>